package com.zzjson.io.nio.demo;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/**
 * <p>****************************************************************************</p>
 * <p><b>Copyright © 2010-2020 shuncom team All Rights Reserved<b></p>
 * <ul style="margin:15px;">
 * <li>Description : com.zzjson.io.nio.demo</li>
 * <li>Version     : 1.0.0</li>
 * <li>Creation    : 2020年02月26日</li>
 * <li>@author     : zzy0_0</li>
 * </ul>
 * <p>****************************************************************************</p>
 */
class BioClient {
	public BioClient() {

	}

	public void send() {
		try {
			Socket socket = new Socket("127.0.0.1", 8080);
			OutputStream outputStream = socket.getOutputStream();
			String s =  "hello hello hello hello hello";
			outputStream.write(s.getBytes());			outputStream.flush();
			outputStream.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static void main(String[] args) {
		BioClient bioClient = new BioClient();
		bioClient.send();
	}
}

